#include "../../Header/Core/State.h"

State::State()
{
	strcpy(m_StatePath, "");
	m_Elements.resize(0);
}

State::~State()
{
	strcpy(m_StatePath, "");
	__int32_ iCount = m_Elements.size();
	if (iCount > 0)
	{
		for (int i = 0; i < iCount; i++)
		{
			SAFE_DELETE(m_Elements.at(i));
		}
	}
	m_Elements.clear();
}

void State::Update(__float_ deltaTime)
{
	__int32_ iCount = m_Elements.size();
	if (iCount > 0)
	{
		for (int i = 0; i < iCount; i++)
		{
			m_Elements.at(i)->Update(deltaTime);
		}
	}
}

void State::Draw()
{
	__int32_ iCount = m_Elements.size();
	if (iCount > 0)
	{
		for (int i = 0; i < iCount; i++)
		{
			m_Elements.at(i)->Draw();
		}
	}
}